package com.stylefeng.guns.rest.modular.product;

import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.rest.common.SimpleObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.HashMap;
import java.util.Map;

/**
 * 常规控制器
 *
 * @author fengshuonan
 * @date 2017-08-23 16:02
 */
@Controller
@RequestMapping("/prd")
public class ProductController {

    @RequestMapping("/saveProduct")
    public ResponseEntity hello(@RequestBody SimpleObject simpleObject) {
        Map returnMap=new HashMap();
        Integer userId= ShiroKit.getUser().getId();
        System.out.println(simpleObject.getUser());
        return new ResponseEntity<Map<String,Object>>(returnMap, HttpStatus.OK);
    }
}
